<?php
//curl_get_contents方法，用于替代file_get_content
//$url:目标地址
//$postData：可选，通过post传递的内容
function curl_get_contents($url,$postData=null){
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_TIMEOUT, 5);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	if ($postData) {
	　　curl_setopt($ch, CURLOPT_POST, 1);
	　　curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
	}
	$r = curl_exec($ch);
	curl_close($ch);
	return $r;
}